package com.hellpro.lolbox.home.model;

import android.content.Context;

import com.hellpro.lolbox.utils.OkHttpClientUtils;

import java.io.IOException;

/**
 * Package_Name: com.hellpro.lolbox.home.model
 * Description :
 * author: HellPermanent
 * date:  2016/10/21 17:45
 * remarks：
 */
public class ZXFragmentModel  implements  IZXFragmentModel {
    private Context mContext;
    public ZXFragmentModel(Context context){
        mContext = context;
    }

    public ZXFragmentModel() {

    }

    @Override
    public void loadFragmentData(final String url , final OnZXListListener listListener) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    String json = OkHttpClientUtils.getStringFromURL(mContext, url, null);
                   listListener.loadSuccees(json);
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();

    }


}
